From 795a17233451c14c6c3aac1850c5782018fa593d Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 21 Sep 2006 14:55:02 +0100 Subject: [PATCH] Pygrub: stop the FS identification code from leaking open fds. Signed-off-by: Tim Deegan --- tools/pygrub/src/fsys/ext2/__init__.py | 2 +- tools/pygrub/src/fsys/reiser/__init__.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/pygrub/src/fsys/ext2/__init__.py b/tools/pygrub/src/fsys/ext2/__init__.py index 4c3fe12c00..ebb5393bcc 100644 --- a/tools/pygrub/src/fsys/ext2/__init__.py +++ b/tools/pygrub/src/fsys/ext2/__init__.py @@ -23,7 +23,7 @@ class Ext2FileSystemType(FileSystemType): fd = os.open(fn, os.O_RDONLY) os.lseek(fd, offset, 0) buf = os.read(fd, 2048) - + os.close(fd) if len(buf) > 1082 and \ struct.unpack("